package com.community.shop.service.impl;

import com.community.shop.entity.vo.AddressVo;
import com.community.shop.entity.vo.GoodSkuVo;
import com.community.shop.mapper.ShopMapper;
import com.community.shop.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopServiceImpl implements ShopService {

    @Autowired
    ShopMapper shopMapper;

    /**
     * 查找地区
     * @return
     */
    @Override
    public List<AddressVo> findLocal() {
        return shopMapper.findLocal();
    }

    /**
     * 添加地区
     * @param addressVos
     */
    @Override
    public void addLocalAddress(List<AddressVo> addressVos) {
        shopMapper.addLocalAddress(addressVos);
    }

    /**
     * 是否已添加
     * @return
     */
    @Override
    public int findLocalCount() {
        return shopMapper.findLocalCount();
    }

    /**
     * 查找商品sku信息存入excel
     * @return
     */
    @Override
    public List<GoodSkuVo> findGoodSkuVoList() {
        return shopMapper.findGoodSkuVoList();
    }
}
